package com.itheima.String;

import java.util.Scanner;

public class Demo07toCharArray {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入:");
        String str= sc.nextLine();
        char[] chars = str.toCharArray();//将字符串转化为字符数组
        for (int i = 0; i < chars.length; i++) {
            System.out.println(chars[i]);
        }
    }
}
